$(function (){
    result =$("#result").val();
    if (result != null && result !=""){
        alert(result);
    }
    $("#back").click(function () {
        if (window.confirm("您确定要返回吗？")) {
            window.history.back(-1);
        }
    });
    var hId = $("#hId").val();
    $.ajax({
        type: "GET",
        url: "hospitalviewbyid",
        data: "hId=" + hId,
        dataType: "json",
        success:function (result){
            $("#hName").val(result.hospital.hName);
            $("#hTel").val(result.hospital.hTel);
            $("#hDesc").val(result.hospital.hDesc);
            $("#hAddress").val(result.hospital.hAddress);
        },
        error: function (result) {
            alert("drugName:查询药品名称失败")
        }
    })
})